home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 June / ccd0605.iso / Software / Shareware / Programare / winhex / Ext Superblock.txt < prev    next >
Text File  |  2005-05-02  |  2KB  |  75 lines

  1. template "Ext2/Ext3 Superblock"
  2.  
  3. // Created by Jens Kirschner on 29 Sep 2004
  4. // X-Ways Software Technology AG, 2004
  5.  
  6. // The first superblock always starts at position 1024 regardless 
  7. // of sector or block sizes on the system. There will be a copy of 
  8. // it in every blockgroup of the drive, always as the first block 
  9. // of the group, UNLESS the "sparse superblock feature" is set on 
  10. // the drive. This is standard these days and will cause the 
  11. // superblock copies to exist only in blockgroups 0, 1 and all 
  12. // powers of 3, 5 and 7. The other blockgroups will neither have 
  13. // superblocks nor group descriptor tables 
  14.  
  15.  
  16. description "To be applied to offset 1024 of an Ext2/3 partition"
  17. applies_to disk
  18. sector-aligned
  19.  
  20. requires 0x38 "53 EF" // ext2 magic 
  21.  
  22. begin
  23.     uint32    "Inode count"
  24.     uint32    "Block count"
  25.     uint32    "Reserved block count"
  26.     uint32    "Free block count"
  27.     uint32    "Free Inode count"
  28.     uint32    "First data block"
  29.     uint32    "Block size (0=1K, 1=2K, 2=4K)"
  30.     int32        "Fragment size (same)"
  31.     uint32    "Blocks per group"
  32.     uint32    "Fragments per group"
  33.     uint32    "Inodes per group"
  34.     UNIXDateTime    "Last mount time"
  35.     UNIXDateTime    "Last write time"
  36.     uint16    "Mount count"
  37.     int16        "Maximal mount count"
  38.     hex 2        "Magic signature (53 EF)"
  39.     uint16    "File system state"
  40.     uint16    "Behavior when detecting errors"
  41.     uint16    "Minor revision level"
  42.     UNIXDateTime    "Time of last check"
  43.     uint32    "Max. time between checks (sec)"
  44.     uint32    "OS (0: Linux)"
  45.     uint32    "Revision level"
  46.     uint16    "Default uid for reserved blocks"
  47.     uint16    "Default gid for reserved blocks"
  48.  
  49.     IfEqual "Revision level" 0
  50.                 // no extended superblock section
  51.     Else
  52.         section "Extended Superblock Section"    
  53.         uint32    "First non-reserved Inode"
  54.         uint16    "Inode size"
  55.         uint16    "This superblock's block group"
  56.         uint32    "Compatibility feature flags"
  57.         uint32    "Incompatibility feature flags"
  58.         uint32    "RO-compatibility feature flags"
  59.         hex 16    "UUID of the volume"
  60.         char[16]    "Volume name"
  61.         move 68
  62.         uint8        "Blocks preallocation"
  63.         uint8        "Directory blocks preallocation"
  64.         move 2
  65.         hex 16    "Journal UUID"
  66.         uint32    "Journal Inode"
  67.         uint32    "Journal device #"
  68.         uint32    "Last orphaned Inode"
  69.         move 16
  70.         uint8        "Hash version"
  71.         move 3
  72.         uint32    "Default mount options"
  73.         uint32    "First metablock block group"
  74.     EndIf
  75. end